<script>
    /**
     *验证输入价格
     * @param {type} event
     * @returns {undefined}
     */
    function validateProduct(event) {
        var price = $(event).val(),
                patten = /\.\d{3}/;
        if (patten.test(price)) {
            var price_array = price.split('.');
            var number_pri = price_array[1].substr(0, 2);
            var price_la = price_array[0].concat('.').concat(number_pri);
            $(event).val(price_la);
        }
    }
</script>
<div class="pageContent">
    <form method="post" action="{:url('Project/domodify')}" class="pageForm" onsubmit="return validateCallback(this, navTabAjaxDone)">
        <div class="pageFormContent" layoutH="58">
            {eq name="$is_company" value="1"}
            <div class="unit">
                <label>检车站：</label>
                <input type="radio" name="is_company" value="1" checked />{$info.company_name}
            </div>
            {/eq}
            <div class="unit">
                <label>车辆类型：</label>
                <input type="radio" name="license_type" value="{$info.license_type}" checked />{$vehicle}
            </div>
            <div class="unit">
                <label>检车项目：</label>
                <input type="radio" name="inspection_id" value="{$info.goods_id}" checked />{$info.goods_name}
            </div>
            <div class="unit">
                <label>价格：</label>
                <input type="text" name="shop_price" size="10" maxlength="8" class="required number" value="{$info.shop_price}" onkeyup="javascript:validateProduct(this);" onpropertychange="javascript:validateProduct(this);"/>
            </div>
            <div class="unit">
                <label>排序：</label>
                <input type="text" name="sort" size="10" maxlength="8" class="required digits" value="{$info.sort}"/>
            </div>
        </div>
        <input type="hidden" name="id" value="{$id}"/>
        <div class="formBar">
            <ul>
                <li><div class="buttonActive"><div class="buttonContent"><button type="submit">提交</button></div></div></li>
                <li><div class="button"><div class="buttonContent"><button type="button" class="close">取消</button></div></div></li>
            </ul>
        </div>
    </form>
</div>

